<template>
  <div id="top">
      <div class="topboxx">
        <!--蓝色矩形-->
        <div class="topbox"></div>  
      </div>

        <div class="text1edit3">
            <p>编辑机构信息</p>
        </div>
        <div class="topbox2">
            <div class="p1box">
                <p class="p1">机构信息</p>
            </div>
        </div>
        <div class="edit3_tab">
            <table border="0px" width="1000px" height="350px">
                <tr>
                    <td align='right'>
                        <font color='#999999'>机构编号</font>
                    </td>
                    <td align='center'>
                        <font >{{list1.organization_id}}</font>
                    </td>
                    <td><font color='#999999'>机构名称</font></td>
                    <td >
                        <el-input v-model="list1.organization_name" ></el-input>
                    </td>
                    <td><font color='#999999'>机构图片</font></td>
                    <td>
                        <img :src="list1.organization_img" width="70" height="70">
                    </td>
                </tr>
                <tr>
                    <td align='right'><font color='#999999'>联系人姓名</font></td>
                    <td>
                        <el-input v-model="list1.organization_lianxiname"></el-input>
                    </td>
                    <td><font color='#999999'>联系电话</font></td>
                    <td>
                        <el-input v-model="list1.organization_iphone"></el-input>
                    </td>
                    <td colspan="2"></td>
                </tr>
                <tr>
                    <td align='right'><font color='#999999'>机构地址</font></td>
                    <td colspan="3">
                        <el-input v-model="list1.organization_area"></el-input>
                    </td>
                    <td colspan="2"></td>
                </tr>
                <tr height="100px">
                    <td align='right'><font color='#999999'>机构介绍</font></td>
                    <td colspan="3">
                        <el-input type="textarea" v-model="list1.organization_info"></el-input>
                    </td>
                    <td colspan="2"></td>
                </tr>
            </table>
        </div>
        
         <div class="editflowbtn1">
             <router-link to="/datas03">
                <el-button
                    plain
                    type="primary"
                    @click="baocun">
                    保存
                </el-button>
              </router-link>

        <router-link to="/datas03">
         <el-button>返回</el-button>
        </router-link>
    </div>


  </div>
</template>

<script>
import axios from "axios";
axios.defaults.baseURL="http://localhost:8080"
export default {
    data () {
        return {
            list1:[]
        }
    },
   methods: {
        baocun(){
            axios({
                url: "/data/updateOrganByid",
                method: "GET",
                params:{
                    edit3list:this.list1
                }
            }).then((res) => {
                this.list1 = res.data; //把值传到list里面
                // console.log(this.list);
                this.$message.success('保存成功')
            })
            
        },
        //查询
      editqueryjigoulist(){
          axios({
            url: "/data/getOrganizationListByid?organization_id="+this.$route.query.id,
            method: "GET",
        }).then((res) => {
            console.log(res);
            this.list1 = res.data; //把值传到list里面
            // console.log("asdfghj"+res.data);
        });
      },
   },
    created () {
        this.editqueryjigoulist();
        document.querySelector('body').setAttribute('style', 'background-color:#F2F7FB')
    },
}
</script>

<style>
*{
    padding: 0;
    margin: 0;
}
#top{
    width: 1150px;
    height: 900px;
     background: white;
    margin: 20px auto;
    position: relative;
}
.topbox{
    border-width: 0px;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 6px;
    height: 20px;
    background: inherit;
    background-color: rgba(41, 132, 248, 1);
    border: none;
    border-radius: 8px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}
.topboxx{
    border-width: 0px;
    position: absolute;
    left: 40px;
    top: 42px;
    width: 6px;
    height: 20px;
}
.text1edit3{
    position: absolute;
    left: 50px;
    top: 43px;
    font-size: 18px;
}
.topbox2{
    position:absolute;
    top: 80px;
    left: 40px;
}
.p1box{
    margin-top: 40px;
}
.p1box11{
    margin-top: 370px;
    margin-left: 10px;
}
.edit3_tab{
    position: absolute;
    top: 160px;
    left: 40px;
}
.dianjishangchuan{
    color: blue;
}
.dianjishangchuan:hover{
    text-decoration: underline;
    color: blue;
}
.editflowbtn1{
    position: absolute;
    top: 550px;
    left: 100px;
}
</style>